home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / UTIL / TouchMe 1.1.1.sit / touchMe 1.11 Folder / CW9 PP source / source / CTouchMeDialog.h < prev    next >
Text File  |  1996-08-08  |  2KB  |  80 lines

  1. // ==================================================
  2. //    CTouchMeDialog.h
  3. //    Copyright (C) 1996 Mizutori Tetsuya, July 4 1996.
  4. // ==================================================
  5. //    All documents are pretty-printed in Geneva 10-point font.
  6.  
  7. #pragma once
  8.  
  9. #include <LDialogBox.h>
  10. #include <LBroadcaster.h>
  11. #include <LDragAndDrop.h>
  12. #include <LCommander.h>
  13.  
  14. #include "CTouchMePref.h"
  15.  
  16.  
  17. class LCommander;
  18.  
  19.  
  20. class CTouchMeDialog : public LDialogBox , public LBroadcaster, public LDragAndDrop {
  21.  
  22. public:
  23.     enum { class_ID = 'TmeD' };
  24.  
  25.     static CTouchMeDialog *    CreateTouchMeDialogStream( LStream *inStream );
  26.                     CTouchMeDialog( LStream *inStream );
  27.                     ~CTouchMeDialog();
  28.  
  29.  
  30.     virtual void        FindCommandStatus( CommandT inCommand,
  31.                             Boolean &outEnabled, Boolean &outUsesMark,
  32.                             Char16 &outMark, Str255 outName );
  33.  
  34.     virtual void        ListenToMessage( MessageT inMessage, void *ioParam );
  35.  
  36.     // Set and Get dialog status according to the 'CTouchMePref' instance data
  37.     void                GetGlobalFrameRect( Rect & outRect );
  38.     void                MoveDialog( CTouchMePref &inPref );
  39.     void                SetupDialog( CTouchMePref & inPref );
  40.     void                InspectDialog( CTouchMePref & outPref );
  41.     void                Indicator( const Boolean inStatus );
  42.  
  43. protected:
  44.  
  45.     // for Dialog
  46.     virtual void        FinishCreateSelf();
  47.     virtual void        DrawSelf();
  48.     virtual void        AttemptClose();
  49.  
  50.     // for Drag and Drop
  51.     virtual Boolean        ItemIsAcceptable( DragReference inDragRef, ItemReference inItemRef );
  52.     virtual void        ReceiveDragItem( DragReference inDragRef,
  53.                         DragAttributes inDragAttrs, ItemReference inItemRef, Rect &inItemBounds );
  54.     virtual void        EnterDropArea( DragReference inDragRef, Boolean inDragHasLeftSender );
  55.     virtual void        LeaveDropArea( DragReference inDragRef );
  56.     virtual void        InsideDropArea( DragReference inDragRef);
  57.     virtual void        HiliteDropArea( DragReference inDragRef );
  58.  
  59. private:
  60.  
  61.     // for Dialog
  62.     void                SetEdifFieldText( PaneIDT inPane, const Str255 inString );
  63.     void                GetEdifFieldText( PaneIDT inPane, Str255 outString );
  64.     void                SetEdifFieldDateTime( PaneIDT inPane, const unsigned long inDateTimeSeconds );
  65.  
  66.     // for Drag and Drop
  67.     Boolean            IsModifierKeyPressed( DragReference inDragRef );
  68.     PaneIDT            FindPaneByMouse( const Point inPoint );
  69.     void                HilitePane( const PaneIDT inPaneID );
  70.     void                HiliteRect( const Rect & inRect );
  71.  
  72.     Boolean            mTEActive;
  73.     Boolean            mModifier;
  74.     PaneIDT            mHilitePaneID;
  75.     PaneIDT            mTargetID;
  76.     LCommander *        mTarget;
  77. };
  78.  
  79. // end of definitions
  80.